<html>
<head>
<title>
rand.c
</title>
</head>
<body bgcolor=white>
<h1 align=center>Description of the routines contained in: 
<font color=Blue>rand.c
</font>
</h1>
<hr>
Sometimes it is useful to use sophisticated routines to produce random
numbers. The file <a href="../../source_c/routines/rand.c">rand.c</a>
contains a couple of quite good 
random number generators. If you want to use one of them, first call
the routine <font color=red>rnd_init(seed)</font> with some integer
number <font color=red>seed</font> to initialize the generators. You
have the choice between the following generators:
<ul>
<li><font color=red>rnd_long()</font>: It returns an unsigned long
random number generated by the following rule:<br>
x<font size =-1>n+1</font>=x<font size =-1>n-9689</font> XOR
x<font size =-1>n-157</font> XOR x<font size =-1>n-314</font> XOR
x<font size =-1>n-471</font><br>
It has a period of 2^9689 and the numbers are uncorrelated up to 4
point correlations.
<li><font color=red>rnd_1279()</font>: It returns an unsigned long
random number generated by the following rule:<br>
x<font size =-1>n+1</font>=x<font size =-1>n-1279</font>+
x<font size =-1>n-216</font>+x<font size =-1>n-299</font>+
x<font size =-1>n-598</font><br>
It has a period of 2^1279 and the numbers are uncorrelated up to 4
point correlations.
<li><font color=red>rnd69069()</font>: It returns an unsigned long
random number generated by the following rule:<br>
x<font size =-1>n+1</font>=x<font size =-1>n</font>*factor+1<br>
where factor=69069 on 32 Bit machines and factor=13^13 on 64 Bit
machines. This one is fast and especially on 64 Bit machines good for
almost all purposes.
<li><font color=red>gaussian()</font>: Returns random numbers which
are distributed gaussian with a variance of 
<font color=red>variance</font> centered around zero.  Interally it
uses the routine <font color=red>rnd_1279()</font>.
</ul>
<hr>
View the <a href="../../source_c/routines/rand.c"> C-sources</a>.
<hr>
<a href=../contents.html>Table of Contents</a> * <a href="../../index.html" target="_top">TISEAN home</a>
</body>
</html>
